home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / DEF / Utilities / Lengths / get-timing < prev    next >
Text File  |  1998-10-23  |  1KB  |  31 lines

  1. get-timing ratio pattern &optional symbol
  2.  
  3. This function returns the timings of each symbol within the pattern. If a ratio '1/1 is used then the resulting numbers describe how many symbol places each symbol takes. If ratios are used then relative timings are returned. If optional symbol is supplied then only the given symbol occurences is timed.
  4.  
  5. (get-timing '1/1 '(a = = = b = = c = d = =))
  6. --> (4/1 3/1 2/1 3/1) 
  7.  
  8. (get-timing '1/8 '(a = = = b = = c = d = =))
  9. --> (1/2 3/8 1/4 3/8)
  10.  
  11. (get-timing '1/8.. '(a = = = b = = c = d = =))
  12. --> (7/8 21/32 7/16 21/32)
  13.  
  14. (get-timing '1/8-5 '(a = = = b = = c = d = =))
  15. --> (1/10 3/40 1/20 3/40)
  16.  
  17. To find out timings of certain symbols an optional symbol may be given:
  18.  
  19. (get-timing '1/8 '(a = = = b = = a = b a =) 'a)
  20. --> (1/2 3/8 1/4 1/8 1/4)
  21.  
  22. (get-timing '1/8 '(a = = = b = = a = b a =) 'b)
  23. --> (1/2 3/8 1/4 1/8 1/4)
  24.  
  25. You can also supply timesheet strings to get-timing. Note the difference between get-timing and get-timing-skiprest, which skips the leading rests.
  26.  
  27. (get-timing-skiprest '1/16 "  -   -  - -  -   -   -   -  - -")
  28. --> (1/4 3/16 1/8 3/16 1/4 1/4 1/4 3/16 1/8 1/16)
  29.  
  30. (get-timing '1/16 "  -   -  - -  -   -   -   -  - -")
  31. --> (1/8 1/4 3/16 1/8 3/16 1/4 1/4 1/4 3/16 1/8 1/16)